<?php


namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Finance\MarketPrice;
use Illuminate\Http\Request;

class MarketPriceController extends Controller
{

    public function price(Request $request){

        $coin = $request->post('coin');
        $coin = $this->decryptData($coin);
        $data = call_user_func(strtolower($coin) . '_usd');
        if($data) {
            return $this->ajaxSuccess($data);
        }else{
            return $this->ajaxError();
        }

    }

}
